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
Guillaume Hervier
slapos.package
Commits
21b9c087
Commit
21b9c087
authored
Jul 31, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change cygwin service name to support multi-instances
parent
36ac3ca0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
5 deletions
+24
-5
windows/scripts/slapos-configure.sh
windows/scripts/slapos-configure.sh
+20
-2
windows/scripts/slapos-cron-config
windows/scripts/slapos-cron-config
+4
-3
No files found.
windows/scripts/slapos-configure.sh
View file @
21b9c087
...
@@ -168,6 +168,9 @@ if ! cygrunsrv --query ${cygserver_service_name} > /dev/null 2>&1 ; then
...
@@ -168,6 +168,9 @@ if ! cygrunsrv --query ${cygserver_service_name} > /dev/null 2>&1 ; then
csih_inform
"run cygserver-config ..."
csih_inform
"run cygserver-config ..."
/usr/bin/cygserver-config
--yes
||
\
/usr/bin/cygserver-config
--yes
||
\
csih_error
"failed to run cygserver-config"
csih_error
"failed to run cygserver-config"
[[
${
cygserver_service_name
}
==
cygserver
]]
||
cygrunsrv
-I
${
cygserver_service_name
}
-d
"CYGWIN
${
cygserver_service_name
}
"
-p
/usr/sbin/cygserver
||
csih_error
"failed to install service
${
cygserver_service_name
}
"
else
else
csih_inform
"the cygserver service has been installed"
csih_inform
"the cygserver service has been installed"
fi
fi
...
@@ -177,19 +180,34 @@ if ! cygrunsrv --query ${syslog_service_name} > /dev/null 2>&1 ; then
...
@@ -177,19 +180,34 @@ if ! cygrunsrv --query ${syslog_service_name} > /dev/null 2>&1 ; then
csih_inform
"run syslog-ng-config ..."
csih_inform
"run syslog-ng-config ..."
/usr/bin/syslog-ng-config
--yes
||
\
/usr/bin/syslog-ng-config
--yes
||
\
csih_error
"failed to run syslog-ng-config"
csih_error
"failed to run syslog-ng-config"
[[
${
syslog_service_name
}
==
"syslog-ng"
]]
||
cygrunsrv
-I
${
syslog_service_name
}
-d
"CYGWIN
${
syslog_service_name
}
"
-p
/usr/sbin/syslog-ng
-a
"-F"
||
csih_error
"failed to install service
${
syslog_service_name
}
"
else
else
csih_inform
"the syslog-ng service has been installed"
csih_inform
"the syslog-ng service has been installed"
fi
fi
check_cygwin_service
${
syslog_service_name
}
check_cygwin_service
${
syslog_service_name
}
if
!
cygrunsrv
--query
${
sshd_service_name
}
>
/dev/null 2>&1
;
then
if
!
cygrunsrv
--query
${
sshd_service_name
}
>
/dev/null 2>&1
;
then
if
csih_is_
xp
&&
[[
-z
"
${
csih_PRIVILEGED_PASSWORD
}
"
]]
;
then
if
csih_is_
vista
&&
[[
-z
"
${
csih_PRIVILEGED_PASSWORD
}
"
]]
;
then
slapos_request_password
${
_administrator
}
"Install sshd service need the password of
${
_administrator
}
."
slapos_request_password
${
_administrator
}
"Install sshd service need the password of
${
_administrator
}
."
fi
fi
csih_inform
"run ssh-host-config ..."
csih_inform
"run ssh-host-config ..."
/usr/bin/ssh-host-config
--yes
--cygwin
ntsec
--port
22002
\
/usr/bin/ssh-host-config
--yes
--cygwin
ntsec
--port
22002
\
--user
${
_administrator
}
--pwd
${
csih_PRIVILEGED_PASSWORD
}
||
--user
${
_administrator
}
--pwd
${
csih_PRIVILEGED_PASSWORD
}
||
csih_error
"Failed to run ssh-host-config"
csih_error
"Failed to run ssh-host-config"
if
csih_is_vista
;
then
[[
${
sshd_service_name
}
==
"sshd"
]]
||
cygrunsrv
-I
${
sshd_service_name
}
-d
"CYGWIN
${
sshd_service_name
}
"
-p
/usr/sbin/sshd
\
-a
"-D"
-y
tcpip
-e
"CYGWIN=ntsec"
-u
"
${
_administrator
}
"
-w
"
${
csih_PRIVILEGED_PASSWORD
}
"
||
csih_error
"failed to install service
${
sshd_service_name
}
"
else
[[
${
sshd_service_name
}
==
"sshd"
]]
||
cygrunsrv
-I
${
sshd_service_name
}
-d
"CYGWIN
${
sshd_service_name
}
"
-p
/usr/sbin/sshd
\
-a
"-D"
-y
tcpip
-e
"CYGWIN=ntsec"
||
csih_error
"failed to install service
${
sshd_service_name
}
"
fi
else
else
csih_inform
"the sshd service has been installed"
csih_inform
"the sshd service has been installed"
fi
fi
...
@@ -205,7 +223,7 @@ if ! cygrunsrv --query ${cron_service_name} > /dev/null 2>&1 ; then
...
@@ -205,7 +223,7 @@ if ! cygrunsrv --query ${cron_service_name} > /dev/null 2>&1 ; then
fi
fi
csih_inform
"run slapos-cron-config ..."
csih_inform
"run slapos-cron-config ..."
${
slapos_cron_config
}
${
_administrator
}
${
csih_PRIVILEGED_PASSWORD
}
||
${
slapos_cron_config
}
${
cron_service_name
}
${
_administrator
}
${
csih_PRIVILEGED_PASSWORD
}
||
csih_error
"Failed to run
${
slapos_cron_config
}
"
csih_error
"Failed to run
${
slapos_cron_config
}
"
else
else
csih_inform
"the cron service has been installed"
csih_inform
"the cron service has been installed"
...
...
windows/scripts/slapos-cron-config
View file @
21b9c087
...
@@ -867,8 +867,9 @@ sanity_check || exit 1
...
@@ -867,8 +867,9 @@ sanity_check || exit 1
get_NT
||
exit
1
get_NT
||
exit
1
slapos_administrator
=
${
1
:slaproot
}
cron_service_name
=
${
1
:cron
}
cron_service_name
=
${
2
:cron
}
slapos_administrator
=
${
2
:slaproot
}
install_service
$*
_password
=
$3
install_service
${
slapos_administrator
}
${
_password
}
exit
$?
exit
$?
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