-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
more robust unzip, use strip-components
- Loading branch information
1 parent
d056446
commit 2639c48
Showing
5 changed files
with
17 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ export LC_ALL=C | |
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | ||
|
||
UI_FOLDER=/var/www/pioreactorui | ||
SYSTEMD_DIR=/lib/systemd/system/ | ||
UI_TAG="24.9.16" # TODO | ||
SYSTEMD_DIR=/etc/systemd/system/ | ||
UI_TAG="24.9.17" # TODO | ||
PIO_DIR="/home/pioreactor/.pioreactor" | ||
|
||
HOSTNAME=$(hostname) | ||
|
@@ -20,14 +20,14 @@ LEADER_HOSTNAME=$(crudini --get "$PIO_DIR"/config.ini cluster.topology leader_ho | |
if [ "$HOSTNAME" != "$LEADER_HOSTNAME" ]; then | ||
# worker updates | ||
|
||
# install pioreactorui | ||
rm -rf $UI_FOLDER | ||
mkdir -p /var/www | ||
# clean up from previous | ||
rm -rf $UI_FOLDER/* | ||
rm -rf /tmp/pioreactorui_cache/ | ||
|
||
|
||
tar -xzf "$SCRIPT_DIR"/pioreactorui_"$UI_TAG".tar.gz | ||
mv pioreactorui-"$UI_TAG" /var/www | ||
mv /var/www/pioreactorui-"$UI_TAG" $UI_FOLDER | ||
# install pioreactorui | ||
mkdir -p "$UI_FOLDER" | ||
tar -xzf "$SCRIPT_DIR"/pioreactorui_"$UI_TAG".tar.gz -C "$UI_FOLDER" --strip-components=1 | ||
|
||
# init .env | ||
mv $UI_FOLDER/.env.example $UI_FOLDER/.env | ||
|
@@ -47,7 +47,7 @@ if [ "$HOSTNAME" != "$LEADER_HOSTNAME" ]; then | |
chmod +x $UI_FOLDER/main.fcgi | ||
|
||
# install lighttp and set up mods | ||
unzip "$SCRIPT_DIR"/lighttpd_packages.zip -d "$SCRIPT_DIR"/lighttpd_packages | ||
unzip -o "$SCRIPT_DIR"/lighttpd_packages.zip -d "$SCRIPT_DIR"/lighttpd_packages | ||
sudo chown -R pioreactor:pioreactor "$SCRIPT_DIR"/lighttpd_packages # required so this can be deleted by pioreactor user if needed to run again. | ||
dpkg -i "$SCRIPT_DIR"/lighttpd_packages/*.deb | ||
|
||
|
@@ -77,8 +77,6 @@ if [ "$HOSTNAME" != "$LEADER_HOSTNAME" ]; then | |
lighttpd -h | ||
flask --help | ||
|
||
|
||
|
||
# we need to restart the monitor jobs on the worker so that the new table (pio_job_metadata) and db exist first | ||
systemctl restart [email protected] | ||
sleep 5 | ||
|
@@ -91,7 +89,7 @@ if [ "$HOSTNAME" != "$LEADER_HOSTNAME" ]; then | |
systemctl start lighttpd.service | ||
systemctl start huey.service | ||
|
||
sleep 1 | ||
sleep 2 | ||
|
||
# test: | ||
curl -LI localhost/unit_api/jobs/running | ||
|