summarylogtreecommitdiffstats
path: root/.INSTALL
diff options
context:
space:
mode:
authormzz20172020-12-19 22:53:37 +0800
committermzz20172020-12-19 22:53:37 +0800
commit3100cb74cd766229e3330db4603a8d09af01d547 (patch)
treef0d97886a815d00fa8ec8290b79f332a9634cd9a /.INSTALL
downloadaur-3100cb74cd766229e3330db4603a8d09af01d547.tar.gz
v1
Diffstat (limited to '.INSTALL')
-rw-r--r--.INSTALL44
1 files changed, 44 insertions, 0 deletions
diff --git a/.INSTALL b/.INSTALL
new file mode 100644
index 00000000000..d72871ce70c
--- /dev/null
+++ b/.INSTALL
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+post_install() {
+ systemctl daemon-reload
+ systemctl enable v2raya
+ systemctl start v2raya
+
+ ECHOLEN=$(echo -e|awk '{print length($0)}')
+ if [ ${ECHOLEN} = '0' ]
+ then
+ ECHO='echo -e'
+ else
+ ECHO='echo'
+ fi;
+ $ECHO "\033[36m******************************\033[0m"
+ $ECHO "\033[36m* Completed! *\033[0m"
+ $ECHO "\033[36m******************************\033[0m"
+}
+
+post_upgrade() {
+ systemctl daemon-reload
+ systemctl restart v2raya
+
+ ECHOLEN=$(echo -e|awk '{print length($0)}')
+ if [ ${ECHOLEN} = '0' ]
+ then
+ ECHO='echo -e'
+ else
+ ECHO='echo'
+ fi;
+ $ECHO "\033[36m******************************\033[0m"
+ $ECHO "\033[36m* Completed! *\033[0m"
+ $ECHO "\033[36m******************************\033[0m"
+}
+
+pre_remove() {
+ systemctl disable v2raya
+ systemctl stop v2raya
+ systemctl stop v2ray
+}
+
+post_remove() {
+ systemctl daemon-reload
+}