-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from yseto/provide-installer
Provide installer
- Loading branch information
Showing
5 changed files
with
97 additions
and
33 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
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
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
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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
PATH=/usr/bin:/bin | ||
DESTBINDIR=${DESTBINDIR:-/usr/local/bin} | ||
DESTETCDIR=${DESTETCDIR:-/usr/local/etc} | ||
|
||
if [ ! -f sabatrapd.yml ]; then | ||
echo "Please create sabatrapd.yml first." | ||
exit 1 | ||
fi | ||
|
||
install -m 755 sabatrapd $DESTBINDIR || exit 1 | ||
install -m 644 sabatrapd.yml $DESTETCDIR/sabatrapd.yml || exit 1 | ||
install -m 644 systemd/sabatrapd.env $DESTETCDIR/sabatrapd.env || exit 1 | ||
install -m 644 systemd/sabatrapd.service `systemd-path systemd-system-unit` || exit 1 | ||
sed -i -e "s|%DESTBINDIR%|$DESTBINDIR|" -e "s|%DESTETCDIR%|$DESTETCDIR|" `systemd-path systemd-system-unit`/sabatrapd.service || exit 1 | ||
systemctl enable sabatrapd.service || exit 1 | ||
systemctl start sabatrapd.service || exit 1 | ||
echo "sabatrapd installation is finished." | ||
echo "$DESTETCDIR/sabatrapd.yml will be used." | ||
echo "To check sabatrapd's status, type 'journalctl -u sabatrapd'" |
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