diff options
author | digwtx <wtx358@qq.com> | 2014-08-31 18:17:25 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2014-08-31 18:17:25 +0700 |
commit | 01c299573cd04fcc3b7612ce8f18459bcf77bf19 (patch) | |
tree | 5e75ad79dd7b53283499d37bbbf05f2a9a67ade4 /system/supervisor/doinst.sh | |
parent | 5a94f78d0a2542e4903b61c9ff7ee833b60fb83b (diff) | |
download | slackbuilds-01c299573cd04fcc3b7612ce8f18459bcf77bf19.tar.gz |
system/supervisor: Added (A system for controlling process state).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/supervisor/doinst.sh')
-rw-r--r-- | system/supervisor/doinst.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/system/supervisor/doinst.sh b/system/supervisor/doinst.sh new file mode 100644 index 0000000000..b0b5ad409c --- /dev/null +++ b/system/supervisor/doinst.sh @@ -0,0 +1,13 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redu +ndant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} +config etc/supervisord.conf.new |