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