This commit is contained in:
simono41 2018-04-05 21:03:30 +02:00
parent 436ae42d84
commit ad0094e90e

View file

@ -9,9 +9,11 @@ repo="SpectreOS"
user="user1" user="user1"
version="%VERSION%" version="%VERSION%"
[[ -n "${2}" ]] && version=${2} if [[ -n "${2}" ]]; then
version=${2}
[[ "$version" == "%VERSION%" ]] && version=voll else
[[ "$version" == "%VERSION%" ]] && version=voll
fi
if [[ $EUID -ne 0 ]]; then if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2 echo "This script must be run as root" 1>&2
@ -133,7 +135,15 @@ function usbsecret() {
function cron() { function cron() {
echo "cron-job snapshot" echo "cron-job snapshot"
mkdir -p ${mountpoint}/var/spool/cron/ mkdir -p ${mountpoint}/var/spool/cron/
echo "0 18 * * * /usr/bin/snapshot make ROOT home opt var/cache/pacman/pkg ${mountsnaps}" > ${mountpoint}/var/spool/cron/root echo "0 18 * * * /usr/bin/snapshot make ROOT home opt var/cache/pacman/pkg " > ${mountpoint}/var/spool/cron/root
# custom-mounts
for wort in ${mountsnaps}
do
echo -n "${wort#/*} " >> ${mountpoint}/var/spool/cron/root
done
echo "" >> ${mountpoint}/var/spool/cron/root
if [ "${update}" != "n" ]; then if [ "${update}" != "n" ]; then
cp /opt/${repo}/snapshot.sh ${mountpoint}/usr/bin/snapshot cp /opt/${repo}/snapshot.sh ${mountpoint}/usr/bin/snapshot
chmod 755 ${mountpoint}/usr/bin/snapshot chmod 755 ${mountpoint}/usr/bin/snapshot