Linux script

Kumpulan beberapa script campuran:

Update software otomatis dari bash

buat script ini di folder /usr/local/bin, namakan dengan aplikasi-update.sh

#!/bin/bash
rm -f /tmp/aplikasi-install.sh
curl https://awebsite.org/install.sh > /tmp/aplikasi-install.sh
bash /tmp/aplikasi-install.sh
rm -f /tmp/aplikasi-install.sh

masukkan di crontab -> sudo crontab -e

# m h  dom mon dow   command
# run tiap minggu
10 9   *   *   7    /usr/local/bin/aplikasi-update.sh
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s