-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunctions.sh
More file actions
executable file
·39 lines (33 loc) · 1.12 KB
/
functions.sh
File metadata and controls
executable file
·39 lines (33 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# functions
#-----------------------------------------
write_scripts(){
echo "sudo systemctl start odoo_${CLIENT}.service" > $WORK/service_start_${CLIENT}.sh
echo "sudo systemctl stop odoo_${CLIENT}.service" > $WORK/service_stop_${CLIENT}.sh
echo "sudo systemctl restart odoo_${CLIENT}.service" > $WORK/service_restart_${CLIENT}.sh
chmod 755 $WORK/service_start_${CLIENT}.sh
chmod 755 $WORK/service_stop_${CLIENT}.sh
chmod 755 $WORK/service_restart_${CLIENT}.sh
echo "added: $WORK/service_start_${CLIENT}.sh"
echo "added: $WORK/service_stop_${CLIENT}.sh"
echo "added: $WORK/service_restart_${CLIENT}.sh"
}
#-----------------------------------------
display_footer() {
# Display a footer:
echo "
The service for $CLIENT can be managed via:
Start:
sudo systemctl start odoo_${CLIENT}.service
Stop:
sudo systemctl stop odoo_${CLIENT}.service
Restart:
sudo systemctl restart odoo_${CLIENT}.service
Status:
sudo systemctl status odoo_${CLIENT}.service
Or start manually with:
$WORK/start_${CLIENT}.sh
URL: http://${CLIENT}.$DOMAIN
"
}
#-----------------------------------------