Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.package
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kasra Jamshidi
slapos.package
Commits
3078b5fd
Commit
3078b5fd
authored
Jul 01, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add slapos-configure as startup item in the Windows
parent
c164337f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
2 deletions
+25
-2
windows/scripts/pre-uninstall.sh
windows/scripts/pre-uninstall.sh
+11
-2
windows/scripts/slapos-configure.sh
windows/scripts/slapos-configure.sh
+14
-0
No files found.
windows/scripts/pre-uninstall.sh
View file @
3078b5fd
...
...
@@ -7,10 +7,11 @@
#
# It will do:
#
#
1.
Remove virtual netcards installed by re6stnet
#
*
Remove virtual netcards installed by re6stnet
#
#
2.
Remove service cron, cygserver and syslog-ng
#
*
Remove service cron, cygserver and syslog-ng
#
# * Remove slapos configure script from windows startup item
#
# Remove virtual netcard installed by re6stnet
...
...
@@ -30,6 +31,14 @@ for x in $(cygrunsrv --list) ; do
cygrunsrv
-R
$x
done
#
# Remove slapos-configure from windows startup item
#
slapos_run_key
=
'\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
slapos_run_entry
=
SlapOS-Node
echo
Removing startup item
"
$slapos_run_key
\\
$slapos_run_entry
"
regtool
-q
unset
"
$slapos_run_key
\\
$slapos_run_entry
"
echo
Run pre-uninstall script successfully.
read
-n
1
-t
60
-p
"Press any key to exit..."
exit
0
...
...
windows/scripts/slapos-configure.sh
View file @
3078b5fd
...
...
@@ -565,6 +565,20 @@ EOF
echo
Cron file
$crontab_file
created.
fi
#-------------------------------------------------
# Add slapos-configure to windows startup item
#-------------------------------------------------
slapos_run_key
=
'\HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run'
slapos_run_entry
=
SlapOS-Node
slapos_run_script
=
/etc/slapos/scripts/slapos-configure.sh
echo
Checking startup item ...
regtool
-q
get
"
$slapos_run_key
\\
$slapos_run_entry
"
||
\
regtool
-q
set
"
$slapos_run_key
\\
$slapos_run_entry
"
\
"
\"
$(
cygpath
-w
/usr/bin/bash
)
\"
--login -i
$slapos_run_script
"
||
\
show_error_exit
"Failed to add slapos-configure.sh as windows startup item."
echo
Startup item
"
$slapos_run_key
\\
$slapos_run_entry
"
:
$(
regtool get
"
$slapos_run_key
\\
$slapos_run_entry
"
)
echo
echo
SlapOS Node configure successfully.
read
-n
1
-t
60
-p
"Press any key to exit..."
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment