aboutsummaryrefslogtreecommitdiff
path: root/mkshrc
diff options
context:
space:
mode:
authorDuncaen <mail@duncano.de>2015-05-10 12:22:29 +0200
committerDuncaen <mail@duncano.de>2015-05-10 12:22:29 +0200
commitea8783cd75b9b86dad5ea44d000cf55f01ca36ff (patch)
treec66d0d13dd277dcf3c115606543b801b68ffdb7d /mkshrc
parent37117872f371810e9c52c05c29e1809189efbf06 (diff)
downloaddotfiles-ea8783cd75b9b86dad5ea44d000cf55f01ca36ff.tar.gz
mkshrc: add runit aliases
Diffstat (limited to 'mkshrc')
-rw-r--r--mkshrc24
1 files changed, 23 insertions, 1 deletions
diff --git a/mkshrc b/mkshrc
index c67ecc6..ad178d8 100644
--- a/mkshrc
+++ b/mkshrc
@@ -424,8 +424,30 @@ alias xi='sudo xbps-install'
alias xr='sudo xbps-remove'
alias xq='xbps-query'
+# runit
+alias svls='sudo sv s /var/service/*'
+alias svu='sudo sv start'
+alias svd='sudo sv stop'
+alias svr='sudo sv restart'
+
+function sva {
+ if [ -r /etc/sv/$1 ]; then
+ sudo ln -sv /etc/sv/$1 /var/service
+ else
+ echo "Service $1 not found"
+ fi
+}
+
+function svrm {
+ if [ -r /var/service/$1 ]; then
+ sudo rm -v /var/service/$1
+ else
+ echo "Service $1 not found"
+ fi
+}
+
# colors
-if [[ ${HOSTNAME} != 'pi' ]]; then
+if [ ${HOSTNAME} != "pi" ]; then
alias ld='grc -es --colour=auto ld'
alias ss='grc -es --colour=auto ss'
alias ps='grc -es --colour=auto ps'