ASTROPORT SETUP
This commit is contained in:
parent
0b8ab3c608
commit
bd5ae1939b
12
setup.sh
12
setup.sh
|
@ -57,8 +57,8 @@ echo '${TYPE};${MEDIAID};${YEAR};${TITLE};${SAISON};${GENRES};_IPNSKEY_;${RES};/
|
||||||
## USED FOR "sudo youtube-dl -U"
|
## USED FOR "sudo youtube-dl -U"
|
||||||
for bin in fail2ban-client mount umount apt-get apt systemctl youtube-dl; do
|
for bin in fail2ban-client mount umount apt-get apt systemctl youtube-dl; do
|
||||||
binpath=$(which $bin)
|
binpath=$(which $bin)
|
||||||
[[ $binpath ]] \
|
[[ -x $binpath ]] \
|
||||||
&& echo "$USER ALL=(ALL) NOPASSWD:$binpath" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/$bin') \
|
&& echo "$USER ALL=(ALL) NOPASSWD:$binpath" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/'$bin) \
|
||||||
&& echo "SUDOERS RIGHT SET FOR : $binpath" \
|
&& echo "SUDOERS RIGHT SET FOR : $binpath" \
|
||||||
|| echo "ERROR MISSING $bin"
|
|| echo "ERROR MISSING $bin"
|
||||||
done
|
done
|
||||||
|
@ -117,9 +117,11 @@ EOF
|
||||||
sudo chattr +i /etc/resolv.conf
|
sudo chattr +i /etc/resolv.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[[ ! $(cat /etc/hosts | grep -w "astroport.local" | head -n 1) ]] \
|
if [[ ! $(cat /etc/hosts | grep -w "astroport.local" | head -n 1) ]]; then
|
||||||
&& sudo echo "127.0.1.1 $(hostname) $(hostname).local astroport astroport.local" >> /etc/hosts
|
cat /etc/hosts > /tmp/hosts
|
||||||
|
echo "127.0.1.1 $(hostname) $(hostname).local astroport astroport.local" >> /tmp/hosts
|
||||||
|
sudo cp /tmp/hosts /etc/hosts && rm /tmp/hosts
|
||||||
|
fi
|
||||||
### ADD 20h12.sh CRON ###############
|
### ADD 20h12.sh CRON ###############
|
||||||
~/.zen/Astroport.ONE/tools/cron_VRFY.sh ON
|
~/.zen/Astroport.ONE/tools/cron_VRFY.sh ON
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue