mirror of https://gitlab.com/bashrc2/epicyon
More general restart script
parent
e3c022f821
commit
5ddbeba91c
|
|
@ -1,12 +1,23 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
if [ -d /etc/epicyon ]; then
|
dir_name="epicyon"
|
||||||
cd /etc/epicyon || exit 0
|
if [ -d /etc/${dir_name} ]; then
|
||||||
|
cd /etc/${dir_name} || exit 0
|
||||||
else
|
else
|
||||||
cd /opt/epicyon || exit 0
|
if [ -d /opt/${dir_name} ]; then
|
||||||
|
cd /opt/${dir_name} || exit 0
|
||||||
|
else if [ -d /opt/epicyon-tor ]; then
|
||||||
|
dir_name="epicyon-tor"
|
||||||
|
cd /opt/${dir_name} || exit 0
|
||||||
|
else if [ -d /opt/epicyon-i2p ]; then
|
||||||
|
dir_name="epicyon-i2p"
|
||||||
|
cd /opt/${dir_name} || exit 0
|
||||||
|
else if [ -d /opt/epicyon-yggdrasil ]; then
|
||||||
|
dir_name="epicyon-yggdrasil"
|
||||||
|
cd /opt/${dir_name} || exit 0
|
||||||
fi
|
fi
|
||||||
git stash
|
git stash
|
||||||
git pull
|
git pull
|
||||||
chown -R epicyon:epicyon *
|
chown -R ${dir_name}:${dir_name} *
|
||||||
chmod 644 *.py
|
chmod 644 *.py
|
||||||
chmod 644 src/*.py
|
chmod 644 src/*.py
|
||||||
systemctl restart epicyon
|
systemctl restart ${dir_name}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue