Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sangahco/pmis-common-script
Common scripts used on a PMIS server
https://github.com/sangahco/pmis-common-script
bash mysqldump rsync
Last synced: about 2 months ago
JSON representation
Common scripts used on a PMIS server
- Host: GitHub
- URL: https://github.com/sangahco/pmis-common-script
- Owner: sangahco
- Created: 2017-01-24T05:40:26.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-11-08T04:18:00.000Z (about 2 months ago)
- Last Synced: 2024-11-08T05:21:13.090Z (about 2 months ago)
- Topics: bash, mysqldump, rsync
- Language: Shell
- Size: 26.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PMIS Common Script
Some of this script can be added to crontab for scheduling the execution of those script,
daily or weekly.Every user in the system has its own crontab scheduler,
so before continuing always check the current user,
and think if this user should run the script or maybe someone else,
than just type in console the following command:$ crontab -e
At the top of the crontab file always put the following lines:SHELL=/bin/bash
BASH_ENV=/home//.bashrc
Doing this we tell to crontab that the following scripts have to be run using the `bash` shell
and it should use the environment in `/home//.bashrc`.Than add the scripts you want to schedule the run with these lines:
# daily schedule
00 02 * * * /home/oracle/script/dbbackup.sh
# weekly schedule (on sunday)
10 02 * * 0 /home/sangah/script/hub/docker-auto.sh restart