-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttpdb.sh
More file actions
42 lines (32 loc) · 852 Bytes
/
Copy pathhttpdb.sh
File metadata and controls
42 lines (32 loc) · 852 Bytes
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
40
41
42
#!/bin/sh
# httpd for arch
# 2026/05/02
#
echo "httpd"
#
onver=onht-2
docroot_dir=$homedir/rfriends3/script/html
sudo $cmd apache2
sudo $cmd php-apache2
cd $curdir/skel_apache
# sed -i は使用しないこと
sed -e s%rfriendshomedir%$homedir%g httpdb.conf.skel > httpd.conf1
sed -e s%rfriendsuser%$user%g httpd.conf1 > httpd.conf2
sed -e s%rfriendsgroup%$group%g httpd.conf2 > httpd.conf3
sed -e s%rfriendsport%$port%g httpd.conf3 > httpd.conf
sudo cp -f httpd.conf $apache_conf_dir/httpd.conf
# webdav
#cd $homedir/rfriends3/script/html
#ln -nfs temp webdav
if [ $sys -eq 1 ]; then
sh httpd_override.sh
echo httpd_override on
sudo systemctl enable httpd
sudo systemctl status httpd
else
sudo service $apache2 restart
sudo service $apache2 enable
sudo service $apache2 status
fi
sudo touch $apache_conf_dir/$onver
exit 0