-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvement on shell script log per service & uninstall (#210)
* run on fork codeql and pylint * use service name for /var/log folder * remove the whole service directory * fix typo * break while loop * service removal, check for directory delete link
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
#!/bin/sh | ||
exec 2>&1 | ||
#Script Directory | ||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) | ||
SCRIPT_DIR=$(realpath $SCRIPT_DIR/../../) | ||
SERVICE_NAME=$(basename $SCRIPT_DIR) | ||
# documentation on how to use multilog https://manpages.debian.org/stretch/daemontools/multilog.8.en.html | ||
exec multilog t s153600 n2 /var/log/dbus-opendtu | ||
exec multilog t s153600 n2 /var/log/${SERVICE_NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters