Add step to upgrade to latest version
Raised dependency to sequencer 10
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
toolName="pyload"
|
||||
toolUser="${toolName}"
|
||||
toolBranch="stable"
|
||||
toolLoc=/opt/pyload
|
||||
toolDownload="https://github.com/pyload/pyload.git"
|
||||
toolDeps="git liblept5 python python-crypto python-pycurl python-imaging python-sleekxmpp tesseract-ocr zip unzip python-openssl libmozjs-24-bin"
|
||||
toolBuildDeps="rar unrar-nonfree"
|
||||
@@ -34,10 +35,8 @@ step_2() {
|
||||
|
||||
step_3_info() { echo "Get $toolName from $toolDownload and create dedicated user"; }
|
||||
step_3() {
|
||||
cd /opt
|
||||
exe git clone -b $toolBranch $toolDownload
|
||||
saveReturn $?
|
||||
endReturn
|
||||
exe git clone -b $toolBranch $toolDownload "$toolLoc"
|
||||
endReturn -o $? "Git clone failed"
|
||||
exe adduser --system "$toolUser"
|
||||
}
|
||||
|
||||
@@ -45,7 +44,7 @@ step_4_info() { echo "Make initial configuration"; }
|
||||
step_4() {
|
||||
echo "Webinterface server \"threaded\" is recommended on a raspberry pi."
|
||||
exe read -p "Press Enter to continue: "
|
||||
cd /opt/pyload
|
||||
exe cd "$toolLoc"
|
||||
exe sudo -u $toolUser python pyLoadCore.py
|
||||
}
|
||||
|
||||
@@ -53,7 +52,6 @@ step_5_info() { echo "Create systemd service"; }
|
||||
step_5() {
|
||||
addConf -c "$toolService" "$toolServiceLoc"
|
||||
}
|
||||
|
||||
toolServiceLoc="/etc/systemd/system/pyload.service"
|
||||
toolService="\
|
||||
[Unit]
|
||||
@@ -67,5 +65,13 @@ ExecStart=/usr/bin/python /opt/pyload/pyLoadCore.py
|
||||
[Install]
|
||||
WantedBy=multi-user.target"
|
||||
|
||||
VERSION_SEQREV=5
|
||||
. sequencer.sh
|
||||
step_10_info() { echo "Upgrade to latest version of branch $toolBranch"; }
|
||||
step_10_alias() { ALIAS="upgrade"; }
|
||||
step_10() {
|
||||
exe cd $toolLoc
|
||||
exe git pull
|
||||
exe service $toolName restart
|
||||
}
|
||||
|
||||
VERSION_SEQREV=10
|
||||
. /usr/local/bin/sequencer.sh
|
||||
|
Reference in New Issue
Block a user