X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;ds=inline;f=bookworm%2Fsetup_scripts%2Fsetup_status.plomlompom.com.sh;h=14289721c9b05f9eaf01887f6df5e96eb6a9c4ba;hb=f628496cf28b4db65ee965218e62989d51dd7aed;hp=99de5743bfd73dad2939b07d04be418008cf01f6;hpb=bb0f8f9a5947b6a65782373a0236573ca5ed7100;p=config diff --git a/bookworm/setup_scripts/setup_status.plomlompom.com.sh b/bookworm/setup_scripts/setup_status.plomlompom.com.sh index 99de574..1428972 100755 --- a/bookworm/setup_scripts/setup_status.plomlompom.com.sh +++ b/bookworm/setup_scripts/setup_status.plomlompom.com.sh @@ -8,13 +8,13 @@ mirror_ip="" mirror_state="not mirroring automatically" domain="status.plomlompom.com" mail="plom+status@plomlompom.com" -if [ "$#" -gt 1 ]; then +if [ "$#" -gt 0 ]; then domain="$1" - if [ "$#" -gt 2 ]; then + if [ "$#" -gt 1 ]; then mail="plom+testing@plomlompom.com" - if [ "$#" -gt 3 ]; then + if [ "$#" -gt 2 ]; then mirror_ip="$3" - mirror_state="mirroring automatically from ${target_ip}" + mirror_state="mirroring automatically from ${mirror_ip}" fi fi fi @@ -37,6 +37,7 @@ ln -s /etc/nginx/sites-available/status.plomlompom.com.nginx /etc/nginx/sites-en if [ ! -z "${mirror_ip}" ]; then # Set up connection to old server. + cp "${setup_scripts_dir}/misc.sh" /home/plom/ cp "${setup_scripts_dir}/prepare_to_meet_server.sh" /home/plom/ chown plom:plom /home/plom/prepare_to_meet_server.sh su -lc "./prepare_to_meet_server.sh ${old_server}" plom @@ -48,6 +49,7 @@ if [ ! -z "${mirror_ip}" ]; then cp "${setup_scripts_dir}/mirror_dir.sh" /home/plom/ su -lc "./mirror_dir.sh ${mirror_ip} /var/www/status.plomlompom.com" plom rm /home/plom/mirror_dir.sh + rm /home/plom/misc.sh fi service nginx restart