23 lines
477 B
Bash
Executable File
23 lines
477 B
Bash
Executable File
#!/bin/sh
|
|
|
|
function clone_repository()
|
|
{
|
|
cd ${LIB_DIR:-/lib}
|
|
sudo git clone https://git.joeac.net/joeac/joeac.net.git
|
|
cd joeac.net
|
|
sudo chmod +x uninstall.sh update_and_restart.sh restart.sh
|
|
}
|
|
|
|
function add_cron_services()
|
|
{
|
|
sudo echo <<- EOF > ${CRONTABS_DIR:-/etc/cron.d}/joeacnet
|
|
@reboot ${LIB_DIR:-/lib}/joeac.net/restart.sh
|
|
10 * * * * ${LIB_DIR:-/lib}/joeac.net/update_and_restart.sh
|
|
EOF
|
|
}
|
|
|
|
set -eux
|
|
clone_repository
|
|
add_cron_services
|
|
./restart.sh
|