Browse Source

Move cron scripts to a private repository

Still, security by offuscation is bad, it's not a good practice to expose
server configurations on the web.
DricomDragon 3 năm trước cách đây
mục cha
commit
41fb2f3882

+ 0 - 5
Server/Scripts/Cron/README.md

@@ -1,5 +0,0 @@
-# Cron scripts
-
-Scripts designed to be put in a crontab with `crontab -e`.
-Use `crontab -l` to see your current crontab. Use `@reboot` at the beginning of a crontab line to execute a command at startup.
-

+ 0 - 14
Server/Scripts/Cron/boot_system

@@ -1,14 +0,0 @@
-#!/usr/bin/fish
-
-# Warn that system reboots and prints logs in jovian home
-## Should be executed as super admin
-
-function printStep
-	echo '-  -  -  -  -'
-	echo "Step $argv"
-	echo '-  -  -  -  -'
-end
-
-printStep 'Rebooted'
-date
-echo 'Script has ended'

+ 0 - 4
Server/Scripts/Cron/pi_root_crontab

@@ -1,4 +0,0 @@
-# m h  dom mon dow   command
-0 3 * * * /home/jovian/Cron/update_system > /home/jovian/Cron/logs/update_system_log.txt 2> /home/jovian/Cron/logs/update_system_error.txt
-0 3 * * 4 /home/jovian/Cron/reboot_system > /home/jovian/Cron/logs/reboot_system_log.txt 2> /home/jovian/Cron/logs/reboot_system_error.txt
-@reboot /home/jovian/Cron/boot_system > /home/jovian/Cron/logs/reboot_system_log.txt 2> /home/jovian/Cron/logs/reboot_system_error.txt

+ 0 - 16
Server/Scripts/Cron/reboot_system

@@ -1,16 +0,0 @@
-#!/usr/bin/fish
-
-# Reboot the system and print logs in jovian home
-## Should be executed as super admin
-
-function printStep
-	echo '-  -  -  -  -'
-	echo "Step $argv"
-	echo '-  -  -  -  -'
-end
-
-printStep 'Start'
-date
-
-printStep 'Reboot'
-systemctl reboot

+ 0 - 11
Server/Scripts/Cron/startgogs

@@ -1,11 +0,0 @@
-#!/usr/bin/fish
-
-## Add it in your crontab at reboot
-## $ sudo su gituser
-## $ crontab -e
-## @reboot /home/gituser/startgogs
-
-## Wait for PostgreSQL
-sleep 30
-
-/home/gituser/gogs/gogs web > /dev/null 2>&1 &

+ 0 - 23
Server/Scripts/Cron/update_system

@@ -1,23 +0,0 @@
-#!/usr/bin/fish
-
-# Update the system and print logs in jovian home
-## Should be executed as super admin
-
-function printStep
-	echo '-  -  -  -  -'
-	echo "Step $argv"
-	echo '-  -  -  -  -'
-end
-
-printStep 'Start'
-date
-
-printStep '1 : update'
-apt update
-
-printStep '2 : upgrade'
-apt upgrade -y
-
-printStep 'End'
-date
-echo 'Script has ended'