From e19656e2efcb1d691c8ef008e2c91555782855bd Mon Sep 17 00:00:00 2001 From: Asaf Gartner Date: Sat, 4 Sep 2021 23:19:12 +0300 Subject: [PATCH] Cinera setup changes --- cinera/cinera.conf.sample | 1 + cinera/setup.sh | 9 +++++++++ cinera/update_annotations.sh | 1 + cinera/update_cinera.sh | 4 ++-- server/serversetup.sh | 1 + 5 files changed, 14 insertions(+), 2 deletions(-) diff --git a/cinera/cinera.conf.sample b/cinera/cinera.conf.sample index 5a520381..81cd4f8f 100755 --- a/cinera/cinera.conf.sample +++ b/cinera/cinera.conf.sample @@ -7,6 +7,7 @@ export SCHEME=https export CINERA_MONIT_GROUP=cinera export CINERA_SCRIPT_PATH=/home/hmn/hmn/cinera export ANNOTATIONS_USER=annotations +export ANNOTATIONS_USER_GROUP=annotations # NOTE(asaf): Known-working version as of 2021-08-26 export CINERA_VERSION=6da970d48ca2cee861b7fe2d8f4d7ed6ca9ccce1 diff --git a/cinera/setup.sh b/cinera/setup.sh index d98a8240..8921379f 100755 --- a/cinera/setup.sh +++ b/cinera/setup.sh @@ -6,6 +6,15 @@ if [ ! -e "cinera.conf" ]; then fi . cinera.conf +mkdir -p $CINERA_OUTPUT_PATH +mkdir -p $CINERA_ASSETS_PATH +mkdir -p $CINERA_SCRIPT_PATH/data + +chgrp $ANNOTATIONS_USER_GROUP $CINERA_OUTPUT_PATH +chgrp $ANNOTATIONS_USER_GROUP $CINERA_ASSETS_PATH +chgrp $ANNOTATIONS_USER_GROUP $CINERA_SCRIPT_PATH +chgrp $ANNOTATIONS_USER_GROUP $CINERA_SCRIPT_PATH/data + ./update_cinera.sh ./update_annotations.sh diff --git a/cinera/update_annotations.sh b/cinera/update_annotations.sh index b5cabb46..118fd98d 100755 --- a/cinera/update_annotations.sh +++ b/cinera/update_annotations.sh @@ -17,6 +17,7 @@ fi cd $CINERA_HMML_PATH git pull +chown -R $ANNOTATIONS_USER:$ANNOTATIONS_USER_GROUP $CINERA_HMML_PATH cp -av $CINERA_HMML_PATH/cmuratori/hero/cinera__hero.css $CINERA_ASSETS_PATH/ cp -av $CINERA_HMML_PATH/miotatsu/riscy/cinera__riscy.css $CINERA_ASSETS_PATH/ diff --git a/cinera/update_cinera.sh b/cinera/update_cinera.sh index 8a7b882b..e46617bd 100755 --- a/cinera/update_cinera.sh +++ b/cinera/update_cinera.sh @@ -6,10 +6,10 @@ if [ ! -e "cinera.conf" ]; then fi . cinera.conf -monit -g $CINERA_MONIT_GROUP stop +systemctl stop cinera.service CMD="cd $CINERA_SCRIPT_PATH; ./user_update_cinera.sh" su - $ANNOTATIONS_USER -c "$CMD" -monit -g $CINERA_MONIT_GROUP start +systemctl start cinera.service diff --git a/server/serversetup.sh b/server/serversetup.sh index d4bebe01..5d9f578b 100755 --- a/server/serversetup.sh +++ b/server/serversetup.sh @@ -52,6 +52,7 @@ if [ $checkpoint -lt 20 ]; then --shell /bin/bash \ --create-home --home-dir /home/annotations \ annotations + usermod -a -G annotations hmn savecheckpoint 20 fi