refactoring changes from sequpgrade (endReturn, ...) and some modernizations
This commit is contained in:
@@ -44,9 +44,9 @@ step_1() {
|
||||
step_2_info() { echo -e "Installing $toolName dependencies"; }
|
||||
step_2() {
|
||||
exe apt install "${toolPhpDeps[@]/#/${sq_phpName}-}" $toolDeps ${sq_aptOpt}
|
||||
endReturn -o $? "Installing deps for $toolName failed"
|
||||
endReturn "Installing deps for $toolName failed"
|
||||
exe service ${sq_phpName}-fpm restart
|
||||
endReturn -o $? "Problems starting $toolName"
|
||||
endReturn "Problems starting $toolName"
|
||||
}
|
||||
|
||||
step_3_info() { echo -e "Get $toolName using git"; }
|
||||
@@ -63,7 +63,7 @@ step_4() {
|
||||
exe cd "${toolPath:?}"
|
||||
exe ${seq_origin:?}/composer.sh -qq install
|
||||
exe sudo -u www-data ${sq_phpName:?} composer.phar install --no-ansi --no-interaction --optimize-autoloader
|
||||
endReturn -o $? "Composer install error"
|
||||
endReturn "Composer install error"
|
||||
}
|
||||
|
||||
step_5_info() { echo "Create mysql database for $toolName"; }
|
||||
@@ -97,10 +97,10 @@ step_7() {
|
||||
step_8_info() { echo "Create pixelfed (horzion) service"; }
|
||||
step_8() {
|
||||
addConf -c "${horizonService}" "${horizonServiceLoc}"
|
||||
endReturn -o $? "Failed to add horizon service"
|
||||
endReturn "Failed to add horizon service"
|
||||
exe systemctl daemon-reload
|
||||
exe systemctl enable pixelfed.service
|
||||
exe service pixelfed start
|
||||
exe service pixelfed start
|
||||
}
|
||||
horizonServiceLoc="/etc/systemd/system/pixelfed.service"
|
||||
horizonService="\
|
||||
@@ -149,7 +149,7 @@ step_10() {
|
||||
addConf -c "$lNginxConfig" "$nginxConfigLoc"
|
||||
exe ln -s "$nginxConfigLoc" "$nginxConfigEnable"
|
||||
exe nginx -t
|
||||
endReturn -o $? "Nginx configuration check error"
|
||||
endReturn "Nginx configuration check error"
|
||||
exe service nginx restart
|
||||
}
|
||||
|
||||
@@ -247,9 +247,9 @@ step_100_alias() { echo "upgrade"; }
|
||||
step_100() {
|
||||
exe cd ${toolPath:?}
|
||||
exe git pull origin $toolTag
|
||||
endReturn -o $? "git pull failed"
|
||||
endReturn "git pull failed"
|
||||
exe git checkout $toolTag
|
||||
endReturn -o $? "git checkout failed"
|
||||
endReturn "git checkout failed"
|
||||
}
|
||||
|
||||
step_101_info() { echo "Recommended post update procedure"; }
|
||||
|
Reference in New Issue
Block a user