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
Xiaowu Zhang
slapos.package
Commits
a469c989
Commit
a469c989
authored
Jul 03, 2013
by
Jondy Zhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add /usr/local/bin to path in the crontab file
Remove init-slapos-node.sh
parent
b74eb518
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
100 deletions
+17
-100
windows/scripts/init-slapos-node.sh
windows/scripts/init-slapos-node.sh
+0
-40
windows/scripts/slapos-all-in-one.iss
windows/scripts/slapos-all-in-one.iss
+0
-2
windows/scripts/slapos-configure.sh
windows/scripts/slapos-configure.sh
+16
-15
windows/scripts/slapos-node-runner.sh
windows/scripts/slapos-node-runner.sh
+0
-40
windows/scripts/slapos-node.sh
windows/scripts/slapos-node.sh
+1
-1
windows/scripts/slapos.iss
windows/scripts/slapos.iss
+0
-2
No files found.
windows/scripts/init-slapos-node.sh
deleted
100755 → 0
View file @
b74eb518
#! /bin/bash
#
# It used to initialzie slapos node when the computer startup:
#
# 1. Start re6stnet,
#
# 2. Run slapformat to synchornize information with master
#
# 3. Start slapproxy
#
# 4.
#
export
PATH
=
/usr/local/bin:/usr/bin:
$PATH
ifname
=
re6stnet-lo
# Run re6stnet
echo
"Start re6stnet ..."
(
cd
/etc/re6stnet
;
re6stnet @re6stnet.conf
--ovpnlog
-I
$ifname
-i
$ifname
&
)
echo
"Start re6stent in the background OK."
echo
"Waiting re6stent network work ..."
while
true
;
do
ping6 slap.vifib.com
&&
break
done
echo
"re6stnet network OK."
# Run slapformat
echo
"Initializing SlapOS Node ..."
/opt/slapos/bin/slapos node format
-cv
--now
if
((
$?
))
;
then
echo
"Initialize SlapOS Node failed."
else
echo
"Initialize SlapOS Node OK."
fi
# Run slapproxy
# /opt/slapos/bin/slapproxy || echo "Start slapproxy failed."
exit
0
windows/scripts/slapos-all-in-one.iss
View file @
a469c989
...
...
@@ -58,12 +58,10 @@ Source: "opt\git\slapos.package\windows\openvpn\src\openvpn\.libs\openvpn.exe";
Source: "opt\openvpn\bin\*"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "opt\openvpn\driver\*"; DestDir: "{app}\cygwin\etc\slapos\driver";
Source: "opt\git\slapos.package\windows\scripts\init-slapos-node.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slapos-node.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\post-install.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\build-slapos.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slapos-configure.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slapos-node-runner.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slap-runner.html"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\pre-uninstall.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
...
...
windows/scripts/slapos-configure.sh
View file @
a469c989
...
...
@@ -267,18 +267,6 @@ else
fi
check_service_state syslog-ng
echo
Checking cron job ...
ps
-ef
|
grep
-q
"/usr/sbin/cron"
if
((
$?
))
;
then
echo
Starting cron job ...
/usr/sbin/cron &
((
$?
))
&&
show_error_exit
"Failed to run cron-config"
disown
-h
echo
The cron job started.
else
echo
The cron job is running.
fi
#-------------------------------------------------
# Configure slapos network
#-------------------------------------------------
...
...
@@ -593,7 +581,7 @@ if (( $? )) ; then
if
((
$?
))
;
then
[[
-d
/var/log/re6stnet
]]
||
mkdir
-p
/var/log/re6stnet
echo
"Install slapos-re6stnet service ..."
cygrunsrv
-I
$service_name
-c
/etc/re6stnet
-p
$(
which re6stnet
)
-a
"@re6stnet.conf"
-u
Administrator
||
\
cygrunsrv
-I
$service_name
-c
/etc/re6stnet
-p
$(
which re6stnet
)
-a
"@re6stnet.conf"
||
\
show_error_exit
"Failed to install
$service_name
service."
echo
"Cygwin
$service_name
service installed."
# echo "Waiting re6stent network work ..."
...
...
@@ -694,8 +682,8 @@ fi
crontab_file
=
/var/cron/tabs/
$(
whoami
)
if
[[
!
-f
$crontab_file
]]
;
then
cat
<<
EOF
>
$crontab_file
SHELL=/bin/sh
PATH=/usr/bin:/usr/sbin:/sbin:/bin
SHELL=/bin/
ba
sh
PATH=/usr/
local/bin:/usr/
bin:/usr/sbin:/sbin:/bin
MAILTO=""
# Run "Installation/Destruction of Software Releases" and "Deploy/Start/Stop Partitions" once per minute
...
...
@@ -715,6 +703,19 @@ EOF
echo
Cron file
$crontab_file
created.
fi
echo
Checking cron job ...
ps
-ef
|
grep
-q
"/usr/sbin/cron"
if
((
$?
))
;
then
echo
Starting cron job ...
/usr/sbin/cron &
((
$?
))
&&
show_error_exit
"Failed to run cron-config"
disown
-h
echo
The cron job started.
else
echo
The cron job is running.
fi
#-------------------------------------------------
# Add slapos-configure to windows startup item
#-------------------------------------------------
...
...
windows/scripts/slapos-node-runner.sh
deleted
100755 → 0
View file @
b74eb518
#! /bin/bash
#
export
PATH
=
/usr/local/bin:/usr/bin:/bin:
$PATH
current_path
=
$(
cygpath
-a
$(
dirname
$0
))
if
[[
!
-f
$current_path
/node-runner.vbs
]]
;
then
echo
Installing slap-runner ...
$current_path
/slapos-configure runner
||
(
echo
Failed to create instance of slap-runner
;
exit
1
)
echo
Install slap-runner OK.
fi
# cat <<EOF > $current_path/node-runner.vbs
# Set oShell = CreateObject("WScript.Shell")
# oShell.OpenBrowser("http://[2001:67c:1254:45::c5d5]:50000")
# EOF
if
[[
-f
$current_path
/node-runner.vbs
]]
;
then
echo
Starting slap-runner ...
cyg_cscript
$current_path
/node-runner.vbs
||
(
echo
Failed to start slap-runner
;
exit
1
)
echo
Start slap-runner OK.
fi
cat
<<
EOF
> slap-runner.html
d>
<script LANGUAGE="JavaScript">
<!--
function openwin() {
location.reload("url")
}
//-->
</script>
</head>
<body onload="openwin()">
</body>
</html>
EOF
windows/scripts/slapos-node.sh
View file @
a469c989
...
...
@@ -123,7 +123,7 @@ if (( $? )) ; then
if
((
$?
))
;
then
[[
-d
/var/log/re6stnet
]]
||
mkdir
-p
/var/log/re6stnet
echo
"Install slapos-re6stnet service ..."
cygrunsrv
-I
$service_name
-c
/etc/re6stnet
-p
$(
which re6stnet
)
-a
"@re6stnet.conf"
-u
Administrator
||
\
cygrunsrv
-I
$service_name
-c
/etc/re6stnet
-p
$(
which re6stnet
)
-a
"@re6stnet.conf"
||
\
show_error_exit
"Failed to install
$service_name
service."
echo
"Cygwin
$service_name
service installed."
# echo "Waiting re6stent network work ..."
...
...
windows/scripts/slapos.iss
View file @
a469c989
...
...
@@ -52,12 +52,10 @@ Source: "opt\git\slapos.package\windows\openvpn\src\openvpn\.libs\openvpn.exe";
Source: "opt\openvpn\bin\*"; DestDir: "{app}\cygwin\usr\local\bin";
Source: "opt\openvpn\driver\*"; DestDir: "{app}\cygwin\etc\slapos\driver";
Source: "opt\git\slapos.package\windows\scripts\init-slapos-node.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slapos-node.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\post-install.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\build-slapos.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slapos-configure.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slapos-node-runner.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\slap-runner.html"; DestDir: "{app}\cygwin\etc\slapos\scripts";
Source: "opt\git\slapos.package\windows\scripts\pre-uninstall.sh"; DestDir: "{app}\cygwin\etc\slapos\scripts";
...
...
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