Created
March 29, 2018 14:06
-
-
Save timoteoramos/4d89e6e44079fbc260953c3732d7c59e to your computer and use it in GitHub Desktop.
Sybase 9 with systemd (first attempt)
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
SVCNAME=sybase9-mydb | |
DBNAME=MYDB | |
DBPORT=2638 | |
DBPATH=/srv/db | |
INITCACHE=2G | |
LOWCACHE=8G | |
UPCACHE=16G |
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
#!/bin/bash | |
source /opt/sybase/SYBSsa9/bin64/asa_config.sh | |
source /etc/sybase9/mydb.sh | |
systemctl stop $SVCNAME | |
/usr/local/sbin/sybase9-mydb-wrapper.sh -f | |
mkdir -p /tmp/sybase9/$DBNAME | |
mv $DBPATH/$DBNAME/DATABASE.log /tmp/sybase/$DBNAME/ | |
systemctl start $SVCNAME |
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
#!/bin/bash | |
source /opt/sybase/SYBSsa9/bin64/asa_config.sh | |
source /etc/sybase9/mydb.sh | |
/opt/sybase/SYBSsa9/bin64/dbsrv9 -n $DBNAME -c$INITCACHE -cl$LOWCACHE -ch$UPCACHE -xTCPIP{serverport=$DBPORT} $* $DBPATH/$DBNAME/DATABASE.DB |
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
[Unit] | |
Description=Sybase 9 (MYDB) | |
[Service] | |
Type=simple | |
User=root | |
WorkingDirectory=/srv/db/MYDB | |
ExecStart=/usr/local/sbin/sybase9-mydb-wrapper.sh | |
Restart=on-failure | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment